package org.mx.dal.test.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.transaction.jta.JtaTransactionManager;

import com.atomikos.icatch.jta.UserTransactionImp;
import com.atomikos.icatch.jta.UserTransactionManager;

@SuppressWarnings("javadoc")
@Configuration
public class JtaTransactionConfig {
	@Bean(name = "jtaTransactionManager")
	@Primary
	public JtaTransactionManager jtaTransactionManager() {
		return new JtaTransactionManager(new UserTransactionImp(), new UserTransactionManager());
	}
}
